package com.wh.springbootrabbitmq.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Auther: HuiEr
 * @Date: 2020/3/15 18:20
 * @Description
 */
@Component
public class RouterListener {


    @RabbitListener(queues = "router_q1")
    public void listen(String string){
        System.out.println(string);
    }

    @RabbitListener(queues = "router_q2")
    public void li(String string){
        System.out.println(string);
    }
}
